function vote(container, direction){
	elem = $(container).parent().find(".vote-score");
	$(elem).hide(300);
    $.ajax({
        type: "POST",
        dataType: "json",
        url: $(container).attr('href'),
        success: function(json){
            if (json.success){
               $(elem).html(""+json.score.score+"/"+json.score.num_votes+"");
               $(elem).show(200);
            }
        }
    });
}	

function qvote(container, direction){
	elem = $(container).parent().find(".qvote-score");
    $.ajax({
        type: "POST",
        dataType: "json",
        url: $(container).attr('href'),
        success: function(json){
            if (json.success){
               $(elem).html(""+json.score.score);
               $(elem).fadeOut();
               $(elem).fadeIn();
            }
        }
    });
}	
